<card> element

A WML deck consists of one or more <card> elements, each of which specifies a single interaction between the user and the device. Devices display a maximum of one card at a time--in some cases, however, a single card may appear as a series of screens. For information on related elements, see <template> element and <wml> element.

Syntax

where content represents the WML card definition and consists of one or more of the following elements:
 
content You can specify any of the following elements in your card definition: 
<onevent> 
<timer> 
<do> 
<a> 
<fieldset> 
<img> 
<input> 
<select> 
<p> 
(see <onevent> element)
(see <timer> element)
(see <do> element)
(see <a> element)
(see <fieldset> element)
(see <img> element)
(see <input> element)
(see <select> element
 
 


IMPORTANT     The contents of a <card> element must be in the following order: 
With the exception of the elements listed above, devices display these elements in the order in which you specify them.

Attributes

 
id Specifies a name for the card. The name acts as a fragment anchor for navigating to that card. For example, you can specify <go href="#cardname"/> to navigate to the card (see <go> element). 
title Specifies a brief label for the card. The UP.Browser uses the label as the default bookmark name when the user bookmarks the card. Some devices might use it for other purposes, such as popup tooltips. 

Note: The UP.Browser does not display the title as part of the card content. The phone manufacturer may optionally display the title if there is sufficient screen real estate. The title attribute should be considered as a hint to the user and not as part of the card content. 

new
context
true | false

Specifies whether the device should initialize the context whenever the user navigates to the card through a <go> task. Specifying newcontext="true" removes all context-specific variables, clears the history stack, and resets the device state to a well-known value. 

ordered true | false

Specifies the organization of card content (see Order options below). ordered="true" causes the device to display content in a fixed sequence. ordered="false" allows users to choose the order in which they navigate between content items. 

onenter
forward
Specifies the URL to open if the user navigates to this card through a <go> task. This attribute represents an abbreviated form of the <onevent> element (see  <onevent> element). 
onenter
backward
Specifies the URL to open if the user navigates to this card through a <prev> task. This attribute represents an abbreviated form of the <onevent> element (see  <onevent> element). 
ontimer Specifies the URL to open if a specified <timer> element expires. This attribute represents an abbreviated form of the <onevent> element (see  <onevent> element). 

 

Order options

The ordered attribute lets you specify how the device will display multiple content items within a card.

True displays the items in a linear sequence (the default value). Use this setting for short forms containing (mostly) required fields. If a device cannot display all the items on one screen, it divides them into multiple screens based on:

False allows users to navigate between items in any order. Use this setting for cards containing optional fields or items with no logical order. If a device cannot display all the items on one screen, it may display a summary card that uses the title attribute for each item to identify the available options. Users can navigate to individual items from the summary card (and then select an option or enter a value, depending on the item definition).

Example 1